<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-model</title>
    <script src="vue.global.js"></script>
</head>
<body>
<div id="app">
用户名：<input type="text" v-model='username' aria-label=""><br>
密码：<input type="password" v-model='password' aria-label=""><br>
<input type="button" value="登录" @click="login">
<input type="button" value="重置" @click="reset">
</div>
<script src="vue.global.js"></script>
<script>
    const app = Vue.createApp({
        data(){
            return{
                username:'',
                password:''
            }
        },
        methods:{
          login(){
              console.log(this.username,this.password)
          },
          reset(){
              this.username=''
              this.password=''
          }
        }
    }).mount('#app')
</script>
</body>
</html>
